﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'TipoProveedorGetList')
	BEGIN
		DROP  Procedure  TipoProveedorGetList
	END
GO

CREATE PROCEDURE TipoProveedorGetList
	(	
		@empresaId AS INT,		
		@filtro AS VARCHAR(50) = NULL
	)	
AS
BEGIN	
	SET NOCOUNT ON
	
	SELECT TipoProveedorId AS Id, Nombre 
	FROM TipoProveedor
	WHERE EmpresaId = @empresaId	  
	  AND Nombre like '%' + ISNULL(@filtro,'') + '%'
	  AND Activo = 1 

	SET NOCOUNT OFF
END
GO

  